import 'package:json_annotation/json_annotation.dart';

part 'user_info.g.dart';

@JsonSerializable()
class UserInfo {
  UserInfo(
    this.id,
    this.bossId,
    this.userType,
    this.username,
    this.truename,
    this.mobilephone,
    this.password,
    this.roleId,
    this.department,
    this.position,
    this.employeeNumber,
    this.genderId,
    this.companyName,
    this.shopName,
    this.shopNumber,
    this.address,
    this.money,
    this.payPassword,
    this.headimg,
    this.wechat,
    this.email,
    this.qq,
    this.remark,
    this.statusId,
    this.lastLogin,
    this.lastIp,
    this.createTime,
    this.updateTime,
    this.deleteTime,
  );

  int id;

  @JsonKey(name: 'boss_id')
  int bossId;

  @JsonKey(name: 'user_type')
  int userType;

  String username;
  String truename;
  String mobilephone;
  String password;

  @JsonKey(name: 'role_id')
  int roleId;

  String? department;
  String? position;

  @JsonKey(name: 'employee_number')
  String employeeNumber;

  @JsonKey(name: 'gender_id')
  int genderId;

  @JsonKey(name: 'company_name')
  String? companyName;

  @JsonKey(name: 'shop_name')
  String? shopName;

  @JsonKey(name: 'shop_number')
  int? shopNumber;

  String address;
  String money;

  @JsonKey(name: 'pay_password')
  String payPassword;

  String? headimg;
  String? wechat;
  String? email;
  String? qq;
  String? remark;

  @JsonKey(name: 'status_id')
  int statusId;

  @JsonKey(name: 'last_login')
  String lastLogin;

  @JsonKey(name: 'last_ip')
  String lastIp;

  @JsonKey(name: 'create_time')
  String createTime;

  @JsonKey(name: 'update_time')
  String updateTime;

  @JsonKey(name: 'delete_time')
  String? deleteTime;

  factory UserInfo.fromJson(Map<String, dynamic> json) => _$UserInfoFromJson(json);

  Map<String, dynamic> toJson() => _$UserInfoToJson(this);
}
